package com.simple.gateway.center.application;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.simple.gateway.center.domian.manage.bo.ApplicationSystemRichBO;
import com.simple.gateway.center.domian.manage.dto.GatewayDistributionDTO;
import com.simple.gateway.center.domian.manage.dto.GatewayServerDTO;
import com.simple.gateway.center.domian.manage.dto.GatewayServerDetailDTO;
import com.simple.gateway.center.domian.manage.param.RegisterGatewayServerParam;
import com.simple.gateway.center.web.param.GatewayServerCompositeParam;

import java.util.List;

/**
 * 项目: simple-gateway-core
 * <p>
 * 功能描述: 网关配置服务
 *
 * @author: WuChengXing
 * @create: 2023-08-07 10:14
 **/
public interface IConfigManageService {

    /**
     * 查询网关服务
     *
     * @return
     */
    List<GatewayServerDTO> queryGatewayServerList();

    /**
     * 注册网关服务
     *
     * @param param
     * @return
     */
    boolean registerGatewayServerNode(RegisterGatewayServerParam param);

    /**
     * 查询聚合对象
     *
     * @param gatewayId
     * @param systemId
     * @return
     */
    ApplicationSystemRichBO queryApplicationSystemRichInfo(String gatewayId, String systemId);

    /**
     * 根据systemId查询网关id
     *
     * @param systemId
     * @return
     */
    String queryGatewayDistribution(String systemId);

    /**
     * 根据网关名分页查询
     *
     * @param groupName
     * @param pageNum
     * @param pageSize
     * @return
     */
    Page<GatewayServerDTO> pageGatewayServer(String groupName, Integer pageNum, Integer pageSize);

    /**
     * 查询详情
     *
     * @param param
     * @return
     */
    Page<GatewayServerDetailDTO> pageGatewayServerDetail(GatewayServerCompositeParam param);

    /**
     * 查询网关-系统映射
     * @param param
     * @return
     */
    Page<GatewayDistributionDTO> pageGatewayDistribution(GatewayServerCompositeParam param);
}
